{% extends 'starter.html' %}

{% block title %}
  <h1>
  学习记录展示
  {% load mytags %}


  </h1>
{% endblock %}

{% block content %}

  <div class="form-inline">

    <form action="" class="pull-right">
      <div class="form-group ">
        <select name="search_field" id="search_field" class="form-control">
          <option value="qq__contains">qq</option>
          <option value="name__contains">name</option>
          <!--  search_field:name  kw:1111  filter(name=1111) -->

        </select>
        <input type="text" class="form-control" id="key_word" placeholder="请输入搜索内容" name="kw">
        <button type="submit" class="btn btn-default">搜索</button>
      </div>

    </form>

  </div>
  <form action="" method="post">
      {% csrf_token %}
      {{ formset.management_form }}
      <div class="form-group pull-left">
        <select name="action" id="action" class="form-control">

          <option value="bulk_create_srecord">xx</option>


        </select>
      </div >
      <button class="btn btn-warning">go</button>

    {{ formset.errors }}
    <table class="table table-striped table-hover table-bordered"
  >
  <thead>
  <tr>
    <th><input type="checkbox" id="select_all">选择</th>
    <th>序号</th>
    <th>考勤</th>
    <th>本节成绩</th>
    <th>作业批语</th>
    <th>某节课程</th>
    <th>学员</th>
    <th>讲师</th>

    <th>操作</th>

  </tr>
  </thead>
  <tbody>
  {% for field in formset %}
    <tr>
      <td>
        <input type="checkbox" name="cids" value="{{ course_record.pk }}">
      </td>
      {{ field.id }}
      <td>{{ forloop.counter }}</td>
      <td>{{ field.attendance }}</td>
      <td>{{ field.score }}</td>
      <td>{{ field.homework_note }}</td>
{#      <td>{{ field.course_record }}</td>#}
      <td>{{ field.instance.course_record }}</td>
      <td class="hidden">{{ field.course_record }}</td>
{#      <td>{{ field.student }}</td>#}
      <td class="hidden">{{ field.student }}</td>
      <td>{{ field.instance.student }}</td>


      <td>
{#        <a href="{% url 'edit_customer' customer_obj.pk %}?next=/customers/?page=3"><i class="fa fa-edit"></i></a>#}
        <a href=""><i class="fa fa-edit"></i></a>
      </td>

    </tr>
  {% endfor %}

  </tbody>
  </table>
    <button class="btn btn-success">提交</button>
    {{ page_html }}
  </form>
{#  {{ page_html|safe }}#}


{#  <nav aria-label="Page navigation">#}
{#    <ul class="pagination">#}
{#      <li>#}
{#        <a href="#" aria-label="Previous">#}
{#          <span aria-hidden="true">&laquo;</span>#}
{#        </a>#}
{#      </li>#}
{#      {% for i in page_num_range %}#}
{#        <li><a href="/customers/?page={{ i }}">{{ i }}</a></li>#}
{#      {% endfor %}#}
{##}
{#      <li>#}
{#        <a href="#" aria-label="Next">#}
{#          <span aria-hidden="true">&raquo;</span>#}
{#        </a>#}
{#      </li>#}
{#    </ul>#}
{#  </nav>#}

{% endblock %}






